import Vue from 'vue'
import Router from 'vue-router'
import Demo from '@/pages/demo.vue'
import Index from '@/pages/index'
import HomeIndex from '@/pages/home/index'
import ArticleIndex from '@/pages/article/index'
import ArticleDetail from '@/pages/article/detail'
import LabelIndex from '@/pages/label/index'

Vue.use(Router)

export default new Router({
  routes: [
    // 主页
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    // 文章列表
    {
      path: '/article',
      name: 'ArticleIndex',
      component: ArticleIndex,
    },
    // 文章详情
    {
        path: '/article/:id',
        name: 'ArticleDetail',
        component: ArticleDetail
    },
    // 标签列表
    {
      path: '/label',
      name: 'LabelIndex',
      component: LabelIndex,
    }
  ]
})
